package com.tourism.dao;

import com.tourism.entity.Room;
import com.tourism.entity.RoomQuery;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Description 房间
 * @Author z
 * @Date 2021-04-25 8:54
 */
@Mapper
public interface RoomDao {
    /**
     * 新增房间
     *
     * @return
     */
    boolean addRoom(Room room);
    /**
     * 修改房间
     *
     * @return
     */
    boolean updateRoom(Room room);

    /**
     * 模糊搜索房间
     *
     * @param roomQuery
     * @return
     */
    List<Room> getRoomList(RoomQuery roomQuery);


    /**
     * 根据id查找房间
     *
     * @param id
     * @return
     */
    Room getRoomById(Long id);
    /**
     * 根据id删除房间信息
     *
     * @param id
     * @return
     */
    Boolean deleteRoomById(Long id);

    /**
     * @param id
     * @param num
     * @return
     */
    boolean updateRoomNum(@Param("id") Long id, @Param("num") int num);

}
